Page({
    data: {
      noticeList: [
        {
          title: '长城景区五一假期限流通知',
          summary: '为确保游客安全，五一期间景区将实施限流措施，请提前预约入园。',
          time: '2025-08-05',
          image: 'https://dengqirong123.oss-cn-hangzhou.aliyuncs.com/assets/gongonsheshi/R-C%20%281%29.jpg'
        },
        {
          title: '年卡用户入园政策更新',
          summary: '自2025年9月起，部分景区年卡用户需提前48小时预约，请留意预约规则更新。',
          time: '2025-08-03',
          image: 'https://dengqirong123.oss-cn-hangzhou.aliyuncs.com/assets/gongonsheshi/zsm.png'
        },
        {
          title: '台风天气临时闭园公告',
          summary: '因受台风影响，景区将于8月7日至8日临时闭园，恢复时间另行通知。',
          time: '2025-08-02',
          image: '../../../assets/zmb.jpg'
        }
      ]
    },
  
    goToDetail(e) {
      const index = e.currentTarget.dataset.index;
      const notice = this.data.noticeList[index];
      wx.navigateTo({
        url: `/pages/noticeDetail/noticeDetail?title=${encodeURIComponent(notice.title)}&content=${encodeURIComponent(notice.summary)}&image=${encodeURIComponent(notice.image)}&time=${notice.time}`
      });
    }
  });
  